<template>
  <div class="dashboard-container">
    <!-- <div id="myCharts" ref="myCharts" class="dashboard-container">ghjyg</div> -->
    <div>
      <div style="width:1120px;height:169px;">
        <!-- <main-diagram /> -->
        <left-box style="float: left;" />
        <!-- <main-histogram /> -->
        <right-box style="float: left; margin-left:20px;" />
      </div>
    </div>
  </div>
</template>
<script>
import { mapGetters } from 'vuex'
import LeftBox from './components/LeftBox.vue'
import RightBox from './components/RightBox.vue'
import { workorderCountAPI, workorderAmountAPI } from '@/api'
// import MainDiagram from './components/MainDiagram.vue'
// import MainHistogram from './components/MainHistogram.vue'
export default {
  name: 'Dashboard',
  components: { LeftBox, RightBox }, // MainHistogram   MainDiagram,
  computed: {
    ...mapGetters([
    ])
  },
  created() {
    this.workorderCount()
    this.workorderAmount()
  },
  methods: {
    async workorderCount() {
      const res = await workorderCountAPI({ start: '2022-10-01 00:00:00', end: '2022-10-31 00:00:00' })
      console.log(res)
    },
    async workorderAmount() {
      const res = await workorderAmountAPI({ start: '2022-10-01 00:00:00', end: '2022-10-31 00:00:00' })
      console.log(res)
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
    width:500px;
    height:500px;

  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
